package jp.co.sn.mml.pojo.tmkkgrpd;

import jp.co.sn.mml.pojo.tmkk.Tmkk;

public class TmkkgrpdId implements java.io.Serializable { 

	//結果グループコード
	private String kkGrpCd;
	//結果コード
	private Tmkk kkCd;
	//入力結果コード
	private String nrKkCd;

	/** default constructor */
	public TmkkgrpdId(){

	}

	/** full constructor */
	public TmkkgrpdId(String kkGrpCd,Tmkk kkCd,String nrKkCd){
		this.kkGrpCd = kkGrpCd;
		this.kkCd = kkCd;
		this.nrKkCd = nrKkCd;
	}

	//Property accessors
	public String getKkGrpCd(){
		return this.kkGrpCd;
	}

	public void setKkGrpCd(String kkGrpCd){
		this.kkGrpCd=kkGrpCd;
	}

	public Tmkk getKkCd(){
		return this.kkCd;
	}

	public void setKkCd(Tmkk kkCd){
		this.kkCd=kkCd;
	}

	public String getNrKkCd(){
		return this.nrKkCd;
	}

	public void setNrKkCd(String nrKkCd){
		this.nrKkCd=nrKkCd;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TmkkgrpdId))
			return false;

		TmkkgrpdId castOther = (TmkkgrpdId) other;

		return ((this.getKkGrpCd() ==  castOther.getKkGrpCd())
				||(this.getKkGrpCd()!=null && castOther.getKkGrpCd() !=null 
					&& castOther.getKkGrpCd() !=null 
					&& this.getKkGrpCd().equals(castOther.getKkGrpCd())))
			&& ((this.getKkCd() ==  castOther.getKkCd())
				||(this.getKkCd()!=null && castOther.getKkCd() !=null 
					&& castOther.getKkCd() !=null 
					&& this.getKkCd().equals(castOther.getKkCd())))
			&& ((this.getNrKkCd() ==  castOther.getNrKkCd())
				||(this.getNrKkCd()!=null && castOther.getNrKkCd() !=null 
					&& castOther.getNrKkCd() !=null 
					&& this.getNrKkCd().equals(castOther.getNrKkCd())))
;	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getKkGrpCd() == null ? 0 : this.getKkGrpCd().hashCode());
		result = 37 * result
				+ (getKkCd() == null ? 0 : this.getKkCd().hashCode());
		result = 37 * result
				+ (getNrKkCd() == null ? 0 : this.getNrKkCd().hashCode());
		return result;
	}

}